<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>管理员登录页面</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="../../bower_components/bootstrap/dist/css/bootstrap.min.css"
          th:href="@{/LoginStyle/css/bootstrap.min.css}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="../../bower_components/font-awesome/css/font-awesome.min.css"
          th:href="@{/LoginStyle/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="../../bower_components/Ionicons/css/ionicons.min.css"
          th:href="@{/LoginStyle/css/ionicons.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" href="../../dist/css/AdminLTE.min.css" th:href="@{/LoginStyle/css/AdminLTE.css}">
    <!-- iCheck -->
    <link rel="stylesheet" href="../../plugins/iCheck/square/blue.css" th:href="@{/LoginStyle/css/blue.css}">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body class="hold-transition register-page ">
<div class="login-box">
    <div class="login-logo">
        <h3>管理员登录</h3>
    </div>
    <!-- /.login-logo -->
    <div class="login-box-body">
        <p class="login-box-msg">登录有问题？<a href="#" class="text-center">联系维护人员</a></p>
            <div class="form-group has-feedback">
                <input type="text" id="name" class="form-control" placeholder="管理员">
                <span class="glyphicon glyphicon-user form-control-feedback"></span>
            </div>
            <div class="form-group has-feedback">
                <input type="password" id="pwd" class="form-control" placeholder="密码">
                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
            </div>
            <div class="row">
                <div class="col-xs-8">
                </div>
                <!-- /.col -->
                <div class="col-xs-4">
                    <button id="submit" class="btn btn-primary btn-block btn-flat">登录</button>
                </div>
                <!-- /.col -->
            </div>
    </div>
    <!-- /.login-box-body -->
</div>
<!-- /.login-box -->

<!-- jQuery 3 -->
<script src="../../bower_components/jquery/dist/jquery.min.js" th:src="@{/LoginStyle/js/jquery.min.js}"></script>
<!-- Bootstrap 3.3.7 -->
<script src="../../bower_components/bootstrap/dist/js/bootstrap.min.js"
        th:src="@{/LoginStyle/js/bootstrap.min.js}"></script>
<!-- iCheck -->
<script src="../../plugins/iCheck/icheck.min.js" th:src="@{/LoginStyle/js/icheck.min.js}"></script>
<script>
    $(function () {
        $('input').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' /* optional */
        });
    });

    $(document).ready(function () {
        $("#submit").click(function () {
            let name = $("#name").val();
            let pwd = $("#pwd").val();
            console.log(name + "," + pwd);
            $.post("/Admin/checkPwd/Data", {
                adminName: name,
                adminPwd: pwd
            }, function (data) {
                if (data == "yes")
                    window.location.href = "/Admin/index";
            })
        });
    });
</script>
</body>
</html>
